/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package learn;

import parse.Category;

/**
 *
 * @author phong
 */
public class LexicalSurface {
    
    String token;
    String lemma;
    String pos;         // POS tag
    String ne;          // named-entity tag
    
    Category cat;       // category
    
    public LexicalSurface(String token, String lemma, String pos, String ne, Category cat) {
        this.token = token;
        this.lemma = lemma;
        this.pos = pos;
        this.ne = ne; 
        this.cat = cat; 
    }
    
    public String getToken() {
        return this.token;
    }
    
    public String getLemma() {
        return this.lemma;
    }
    
    public String getPos() {
        return this.pos;
    }
    
    public String getNe() {
        return this.ne;
    }
    
    public Category getCat() {
        return this.cat;
    }
    
    @Override
    public boolean equals(Object o) {
        if (o instanceof LexicalSurface) {
            LexicalSurface that = (LexicalSurface)o;
            return this.token.equals(that.token) && this.pos.equals(that.pos) 
                    && this.ne.equals(that.ne) && this.cat.equals(that.cat);
        }
        else 
            return false;
    }
    
    @Override
    public int hashCode() {
        return this.token.hashCode() + this.pos.hashCode() + 
                this.ne.hashCode() + this.cat.hashCode() * 17;
    }
}
